﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChartManager.Models
{
    /// <summary>
    /// 歌曲
    /// </summary>
    public class Song
    {
        /// <summary>
        /// id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 内部实际歌手名单
        /// </summary>
        private List<string> _Singers { get; set; }
        /// <summary>
        /// 歌手名单
        /// </summary>
        public List<string> Singers { get { return _Singers; } set { _Singers = value; } }
        /// <summary>
        /// 用于数据库存储的歌手名单
        /// </summary>
        public string SingersAsString { get { return string.Join(", ", _Singers); } set { _Singers = value.Split(new string[] { ", " }, StringSplitOptions.None).ToList(); } }
        /// <summary>
        /// 歌名
        /// </summary>
        public string Name { get; set; }
    }
}
